import * as types from './mutations_types';
module.exports = {
    [types.QUEYY_TARGET](state, data) {
        state.targetList = data || [];
    },
    [types.LOG_LIST](state, data) {
        state.logList = data.list || [];
        state.logTotal = data.total || '';
    },
    [types.TASK_LIST](state, data) {
        state.taskList = data.list || [];
        state.taskTotal = data.total || '';
    },
    [types.DICTIONARY_LIST](state, data) {
        state.dictionaryList = data.list || [];
        state.dictionaryTotal = data.total || '';
    },
    [types.DICTIONARYEDIT_LIST](state, data) {
        state.dictionaryeditList = data.list || [];
        state.dictionaryeditTotal = data.total || '';
    },
    [types.QUEST_LIST](state, data) {
        state.questList = data.questionnaireList || [];
        state.questTotal = data.total || '';
    },
    [types.CHECK](state, data) {
        state.checkscores = data || [];
    },
    [types.LOGIN_USER](state, data) {
        state.userinfo = {
            loginid: data.userId || ''
        };
    },
    [types.DELETE_QUEST](state, data) {
        state.deletequest = data || [];
    },
    [types.LOGIN_USER](state, data) {
        state.userinfo = {
            login: data.login || '',
            name: data.name || ''
        };
    }
};